package com.lewis.jpa.entity;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Cacheable(true)
@GenericGenerator(name = "UUID_GEN", strategy = "uuid", parameters = { @Parameter(name = "separator", value = "-") })
public class Location extends BaseEntity<String> {

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "UUID_GEN")
	@Column(name = "id")
	private String id;
	@NotNull
	@Column(name = "city")
	private String city;
	@NotNull
	@Column(name = "country")
	private String country;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

}
